package com.dxf.sysadmin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 员工表
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("emp")
@ApiModel(value="Emp对象", description="员工表")
public class Emp extends Model<Emp> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "工号")
    @TableField("workNo")
    private String workNo;

    @ApiModelProperty(value = "岗位(0:系，1：室，2：教)")
    private String duty;

    @ApiModelProperty(value = "部门id")
    @TableField("deptId")
    private Long deptId;

    @ApiModelProperty(value = "系统账号id")
    @TableField("userId")
    private Long userId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
